


import bpy

from 节点.全局控制.Node.插座 import bl_插座基类

from 节点.Core import bl_UI配色
from 节点.全局控制.Node.节点数据类型 import bl_集合数据类型




def f_数据传入内部插座(self, data):
	engineLib.flexCAPI.f_bl_插座传入数据(
										ctypes.c_wchar_p(self.node.id_data.name), 
										ctypes.c_wchar_p(self.node.name), 
										ctypes.c_wchar_p(self.identifier), 
										ctypes.py_object(data),
										ctypes.c_bool(self.is_output)
		)




class C_Socket_材质_Array1D(bl_插座基类.C_Socket_基类):
	bl_label = '纹理集 Array1D'
	bl_icon = 'FILE_IMAGE'
	default_value = bpy.props.PointerProperty(type=bpy.types.Material)
	def __init__(self):
		super(C_Socket_材质_Array1D, self).__init__()

	def draw(self, context, layout, node, text):
		if self.is_output == False and self.is_linked == False :
			layout.prop( self, 'default_value', text=text )
		else:
			layout.label(text="[Material]:"+text)

	def draw_color(self, context, node):
		return bl_UI配色.g_物体插座颜色
	def f_getData(self):
		return self.m_Value
	def f_setData(self, data):
		f_数据传入内部插座(self, data)










classes = (
	C_Socket_材质_Array1D,
	
)

def register():
	for c in classes:
		bpy.utils.register_class(c)
	pass	

def unregister():
	for c in classes:
		bpy.utils.unregister_class(c)
	pass



